package com.scy;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class Demo05 {
    //TCP
    //客户端
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1",11000);
        //获取输出流对象
        OutputStream os = socket.getOutputStream();
        os.write("你好,老李".getBytes());

        //关流
        socket.close();
    }
}
